package com.sqsf.cglib;
//cglib代理基于父类 或者说可以看做将目标类最为父类
public class CGLIBProxy extends CGLIBTarget{
    CGLIBTarget cGLIBTarget;

    public CGLIBProxy(CGLIBTarget cGLIBTarget) {
        this.cGLIBTarget = cGLIBTarget;
    }

    @Override
    public void run() {
        //在调用原方法之前额外执行其他功能
        System.out.println("other method run......");

        cGLIBTarget.run();
    }
}
